import request from '@/utils/request'

export function login(data) {
  return request({
    url: `/auth/login`,
    method: 'post',
    headers: {
      'Is-Encrypt': true
    },
    data
  })
}

export function getInfo() {
  return request({
    url: `/auth/info`,
    method: 'get'
  })
}

export function logout() {
  return request({
    url: `/auth/logout`,
    method: 'post'
  })
}

export function captcha(captchaKey) {
  return request({
    url: `/auth/captcha`,
    method: 'get',
    params: { captchaKey }
  })
}
